package org.wendu.wdoa.exam.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.wendu.wdoa.common.page.PageParam;
import org.wendu.wdoa.common.page.PageUtils;
import org.wendu.wdoa.exam.dao.ExamDao;
import org.wendu.wdoa.exam.model.leave;
import org.wendu.wdoa.exam.service.ExamService;

import java.util.Date;
import java.util.Map;

@Service
public class ExamServiceImpl implements ExamService {
    @Autowired
    private ExamDao examDao;
    @Override
    public Map<String, Object> getMgrLeaveList(String userId, PageParam pageParam) {
        return PageUtils.getPage(pageParam,()->examDao.findMgrLeaveList(userId,pageParam));
    }

    @Override
    public void checkLeave(String userName, leave leave) {
        leave.setL_sp_date(new Date());
        examDao.checkLeave(userName,leave);
    }


}
